void __attribute__((naked,noinline)) sub_FFC61EA4_my(){
asm volatile(
                "LDR     R12, =0x201E\n"
                "STMFD   SP!, {R4,LR}\n"
                "CMP     R0, R12\n"
                "BEQ     loc_FFC61F64\n"
                "BGT     loc_FFC61F00\n"
                "LDR     R12, =0x2004\n"
                "CMP     R0, R12\n"
                "BEQ     loc_FFC61F6C\n"
                "BGT     loc_FFC61EE8\n"
                "SUB     R12, R0, #0x1000\n"
                "SUBS    R12, R12, #0xA9\n"
                "SUBNE   R12, R0, #0x1000\n"
                "SUBNES  R12, R12, #0xAD\n"
                "SUBNE   R12, R0, #0x1000\n"
                "SUBNES  R12, R12, #0xAF\n"
                "BNE     loc_FFC61F7C\n"
                "B       loc_FFC61F64\n"
"loc_FFC61EE8:\n"
                "SUB     R12, R0, #0x2000\n"
                "SUBS    R12, R12, #5\n"
                "SUBNE   R12, R0, #0x2000\n"
                "SUBNES  R12, R12, #0x1D\n"
                "BNE     loc_FFC61F7C\n"
                "B       loc_FFC61F64\n"
"loc_FFC61F00:\n"
                "LDR     R12, =0x5004\n"
                "CMP     R0, R12\n"
                "BEQ     loc_FFC61F64\n"
                "BGT     loc_FFC61F2C\n"
                "SUB     R12, R0, #0x3000\n"
                "SUBS    R12, R12, #0xA\n"
                "BEQ     loc_FFC61F60\n"
                "SUB     R12, R0, #0x5000\n"
                "SUBS    R12, R12, #1\n"
                "BNE     loc_FFC61F7C\n"
                "B       loc_FFC61F64\n"
"loc_FFC61F2C:\n"
                "SUB     R12, R0, #0x5000\n"
                "SUBS    R12, R12, #6\n"
                "BEQ     loc_FFC61F64\n"
                "SUB     R12, R0, #0x5000\n"
                "SUBS    R12, R12, #7\n"
                "BNE     loc_FFC61F7C\n"
                "BL      sub_FFC1CF54\n"
                "LDR     R1, =0x5DE4\n"
                "LDR     R0, [R1,#0x10]\n"
                "CMP     R0, #7\n"
                "LDREQ   R0, [R1,#0x18]\n"
                "BLEQ    sub_FFC628AC\n"
                "B       loc_FFC61F74\n"
"loc_FFC61F60:\n"
                "BL      sub_FFC1C398\n"
"loc_FFC61F64:\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC61D54_my\n"   //------------->
"loc_FFC61F6C:\n"
                "BL      sub_FFC60C0C\n"
                "BL      sub_FFC6170C\n"
"loc_FFC61F74:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4,PC}\n"
"loc_FFC61F7C:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
}


void __attribute__((naked,noinline)) sub_FFC61D54_my(){
asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "BL      sub_FFC629D4\n"
                "CMP     R0, #1\n"
                "BLEQ    sub_FFC62AB4\n"
                "LDR     R4, =0x5DE4\n"
                "MOV     R5, #1\n"
                "LDR     R0, [R4,#0x24]\n"
                "CMP     R0, #0\n"
                "LDRNE   R0, [R4,#0x4C]\n"
                "CMPNE   R0, #0\n"
                "BEQ     loc_FFC61DC0\n"
                "BL      sub_FFC629D4\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC61DC0\n"
                "BL      sub_FFC62AB4\n"
                "LDR     R0, [R4,#0x78]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC61DC0\n"
                "LDR     R1, =0xFFC61F84\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC59F24\n"
                "BL      sub_FFD7A014\n"
                "BL      sub_FFD79FA0\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x51\n"
                "BL      sub_FFC6A7D8\n"
                "STR     R5, [R4,#0x78]\n"
"loc_FFC61DC0:\n"
                "BL      sub_FFC629D4\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC61E0C\n"
                "LDR     R0, [R4,#0x44]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC61E0C\n"
                "LDR     R0, [R4,#0x74]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC61E0C\n"
                "LDR     R1, =0xFFC61F98\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC59F24\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x8C\n"
                "BL      sub_FFC6A7D8\n"
                "BL      sub_FFC68A8C\n"
                "MOV     R0, #0x21\n"
                "BL      sub_FFC6A818\n"
                "STR     R5, [R4,#0x74]\n"
"loc_FFC61E0C:\n"
                "LDR     R0, [R4,#0x38]\n"
                "CMP     R0, #0\n"
                "LDRNE   R0, [R4,#0x3C]\n"
                "CMPNE   R0, #0\n"
                "LDRNE   R0, [R4,#0x44]\n"
                "CMPNE   R0, #0\n"
                "LDRNE   R0, [R4,#0x48]\n"
                "CMPNE   R0, #0\n"
                "LDRNE   R0, [R4,#0x1C]\n"
                "LDRNE   R1, [R4,#0x20]\n"
                "ORRNES  R0, R0, R1\n"
                "BEQ     loc_FFC61E48\n"
                "BL      sub_FFC6151C\n"
                "BL      sub_FFC6170C\n"
                "B       loc_FFC61E6C\n"
"loc_FFC61E48:\n"
                "LDR     R0, [R4,#0x58]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC61E74\n"
                "BL      sub_FFC615B8\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC61E74\n"
                "BL      sub_FFC644A0\n"
                "BL      sub_FFC642C0\n"
                "BL      sub_FFC628E8\n"
"loc_FFC61E6C:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
"loc_FFC61E74:\n"
                "BL      sub_FFC615B8\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC61E9C\n"
                "LDR     R0, [R4,#0x7C]\n"
                "CMP     R0, #0\n"
                "BLEQ    sub_FFC62AF8_my\n"  //-------------->
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x70]\n"
                "STR     R0, [R4,#0x74]\n"
                "STR     R0, [R4,#0x78]\n"
"loc_FFC61E9C:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
);
}






void __attribute__((naked,noinline)) sub_FFC62AF8_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC62D34\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC59F24\n"
                "BL      sub_FFC1C5BC\n"
                "BL      sub_FFC62FD0\n"
                "BL      sub_FFC6633C_my\n"   //------------->
                "MOV     R0, #1\n"
                "BL      sub_FFC60FB4\n"
                "BL      sub_FFC614A0\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC6176C\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC6633C_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R1, =0xFFC66530\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC59F24\n"
                "LDR     R4, =0x607C\n"
                "MOV     R0, #6\n"
                "MOV     R5, #1\n"
                "STR     R0, [R4,#0x60]\n"
                "STR     R5, [R4,#0x10]\n"
                "BL      sub_FFD281AC\n"
                "BL      sub_FFD3C18C\n"
                "BL      sub_FFD2F318\n"
                "BL      sub_FFD2D054\n"
                "BL      sub_FFC66960_my\n"  //---------------->
                "BL      sub_FFD3CB54\n"
                "BL      sub_FFD39478\n"
                "BL      sub_FFD3C034\n"
                "MOV     R0, #1\n"
                "STR     R5, [R4,#0x1C]\n"
                "BL      sub_FFC66A48\n"
                "MOV     R0, #3\n"
                "STR     R0, [R4,#0x6C]\n"
                "LDR     R1, [R4,#0x70]\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "MOV     R0, #0\n"
                "BX      R1\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC66960_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R0, =0x855\n"
                "BL      sub_FFC5ED78\n"
                "BL      sub_FFC1C398\n"
                "BL      sub_FFC66108_my\n"  //------------>
                "BL      sub_FFD27A94\n"
                "BL      sub_FFD22EB4\n"
                "BL      sub_FFD313A0\n"
                "BL      sub_FFD31A30\n"
                "BL      sub_FFD39050\n"
                "BL      sub_FFD31EDC\n"
                "BL      sub_FFD3C5A0\n"
                "BL      sub_FFD3BD08\n"
                "BL      sub_FFD31578\n"
                "BL      sub_FFD3B740\n"
                "BL      sub_FFD2FC58\n"
                "BL      sub_FFD38C30\n"
                "BL      sub_FFD38734\n"
                "BL      sub_FFD2DDC0\n"
                "BL      sub_FFD3ACE4\n"
                "BL      sub_FFC6A958\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC6A6E8\n"
 );
} 




void __attribute__((naked,noinline)) sub_FFC66108_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R0, =0x60F0\n"
                "LDR     R1, =sub_FFC65E88_my\n"   //-------------->
                "BL      sub_FFC6C228\n"
                "LDR     R1, =0x607C\n"
                "LDR     R0, =sub_FFC65FC0_my\n"   //--------------->
                "STR     R0, [R1,#0x70]\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
} 



//branch 1

void __attribute__((naked,noinline)) sub_FFC65E88_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R5,LR}\n"
                "BL      sub_FFD21C78\n"
                "LDR     R4, =0x607C\n"
                "LDR     R0, [R4,#0x34]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC65EC0\n"
                "LDR     R1, =0xFFC65FA0\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC59F24\n"
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x34]\n"
                "STR     R0, [R4,#0x30]\n"
                "BL      sub_FFC65DA0\n"
                "LDMFD   SP!, {R3-R5,PC}\n"
"loc_FFC65EC0:\n"
                "BL      sub_FFC16814\n"
                "LDRH    R0, [R4,#4]\n"
                "SUB     R12, R0, #0x8200\n"
                "SUBS    R12, R12, #0xA\n"
                "BNE     loc_FFC65EE4\n"
                "MOV     R0, #0x24\n"
                "BL      sub_FFC6A818\n"
                "MOV     R0, #0x25\n"
                "BL      sub_FFC6A818\n"
"loc_FFC65EE4:\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, SP\n"
                "STRH    R0, [SP]\n"
                "LDR     R0, [R4,#0x60]\n"
                "STRH    R0, [SP,#2]\n"
                "MOV     R0, #0x40\n"
                "BL      sub_FFC6A7D8\n"
                "LDR     R0, [R4,#0x20]\n"
                "CMP     R0, #0\n"
                "LDREQH  R0, [R4,#4]\n"
                "BLEQ    sub_FFC60124\n"
                "LDRH    R0, [R4,#4]\n"
                "MOV     R1, #1\n"
                "BL      sub_FFC6527C_my\n"    //----------------->
                "LDR     R0, [R4,#0x6C]\n"
                "BL      sub_FFC66A48\n"
                "MOV     R0, #3\n"
                "STR     R0, [R4,#0x6C]\n"
                "LDR     R1, [R4,#0x70]\n"
                "ADD     SP, SP, #4\n"
                "LDMFD   SP!, {R4,R5,LR}\n"
                "MOV     R0, #0\n"
                "BX      R1\n"
 );
} 




//branch 2

void __attribute__((naked,noinline)) sub_FFC65FC0_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "LDR     R5, =0x607C\n"
                "LDRH    R0, [R5,#4]\n"
                "BL      sub_FFD2F550\n"
                "BL      sub_FFD2D288\n"
                "BL      sub_FFD31634\n"
                "BL      sub_FFD31F78\n"
                "BL      sub_FFD3911C\n"
             // "BL      nullsub_101\n"
                "BL      sub_FFD2FDF4\n"
                "MOV     R4, #0\n"
                "MOV     R0, R4\n"
                "STR     R4, [R5,#0x28]\n"
                "BL      sub_FFC168FC\n"
                "LDR     R0, [R5,#0x14]\n"
                "LDR     R6, =0x313D\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC66038\n"
                "BL      sub_FFC5CC8C\n"
                "STR     R0, [R5,#0x5C]\n"
                "STR     R4, [R5,#0x1C]\n"
                "STR     R4, [R5,#0x14]\n"
                "STR     R4, [R5,#0x30]\n"
                "MOV     R0, #0xC\n"
                "STR     R4, [R5,#0x24]\n"
                "BL      sub_FFC2D9D0\n"
                "MOV     R0, R6\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "MOV     R1, #0\n"
                "B       sub_FFC5D6FC\n"
"loc_FFC66038:\n"
             // "BL      nullsub_108\n"
                "STR     R4, [R5,#0x40]\n"
                "LDRH    R0, [R5,#4]\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC6527C_my\n"    //-------------->
                "BL      sub_FFC68A8C\n"
                "LDR     R0, [R5,#0x64]\n"
                "CMP     R0, #0\n"
                "STRNE   R4, [R5,#0x64]\n"
                "BLNE    sub_FFC665C4\n"
                "BL      sub_FFC665C4\n"
                "LDR     R1, [R5,#0x60]\n"
                "MOV     R0, #0x41\n"
                "BL      sub_FFC6A7D8\n"
                "BL      sub_FFC665C4\n"
                "BL      sub_FFD2D248\n"
                "BL      sub_FFD28320\n"
                "CMP     R0, #0\n"
                "BLEQ    sub_FFD2D28C\n"
                "BL      sub_FFD2F4D8\n"
                "BL      sub_FFD21AE8\n"
                "BL      sub_FFC5CC8C\n"
                "STR     R0, [R5,#0x5C]\n"
                "LDR     R0, [R5,#0x14]\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #0xC\n"
                "STRNE   R4, [R5,#0x14]\n"
                "BLNE    sub_FFC2D9D0\n"
                "LDR     R0, =0x8003\n"
                "STR     R4, [R5,#0x30]\n"
                "BL      sub_FFC60288\n"
                "STRH    R0, [R5]\n"
                "MOV     R0, R6\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC5D6FC\n"
                "BL      sub_FFC668DC\n"
                "LDR     R0, [R5,#0x34]\n"
                "CMP     R0, #1\n"
                "STREQ   R4, [R5,#0x34]\n"
                "LDMEQFD SP!, {R4-R6,LR}\n"
                "BEQ     sub_FFC65DA0\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
 );
} 




//branches are joining here

void __attribute__((naked,noinline)) sub_FFC6527C_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "MOV     R5, R0\n"
                "MOV     R4, R1\n"
                "LDR     R1, =0xFFC65474\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "LDR     R6, =0x607C\n"
                "LDR     R0, [R6,#0x10]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC65434\n"
                "LDR     R0, [R6,#0x1C]\n"
                "LDR     R1, =0x820A\n"
                "LDR     R2, =0xFFFE0000\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC652FC\n"
                "CMP     R4, #1\n"
                "LDMEQFD SP!, {R4-R6,PC}\n"
                "CMP     R4, #0\n"
                "BNE     loc_FFC652FC\n"
                "CMP     R5, R1\n"
                "BNE     loc_FFC652DC\n"
                "BL      sub_FFC6695C\n"
                "BL      sub_FFC66608\n"
                "B       loc_FFC65434\n"
"loc_FFC652DC:\n"
                "CMP     R2, R5,LSL#17\n"
                "TSTNE   R5, #0xC00\n"
                "BEQ     loc_FFC652F0\n"
                "BL      sub_FFC666B0_my\n"  //-------------->
                "B       loc_FFC652F4\n"
"loc_FFC652F0:\n"
                "BL      sub_FFC66664\n"
"loc_FFC652F4:\n"
                "BL      sub_FFC6695C\n"
                "B       loc_FFC65434\n"
"loc_FFC652FC:\n"
                "CMP     R5, R1\n"
                "BNE     loc_FFC65350\n"
                "LDRH    R0, [R6,#2]\n"
                "CMP     R0, R1\n"
                "BEQ     loc_FFC6542C\n"
                "CMP     R2, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC65334\n"
                "LDR     R1, =0xFFC65494\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC65404\n"
                "B       loc_FFC65348\n"
"loc_FFC65334:\n"
                "LDR     R1, =0xFFC654A4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC65420\n"
"loc_FFC65348:\n"
                "BL      sub_FFC66608\n"
                "B       loc_FFC6542C\n"
"loc_FFC65350:\n"
                "CMP     R2, R5,LSL#17\n"
                "LDRH    R0, [R6,#2]\n"
                "TSTNE   R5, #0xC00\n"
                "BEQ     loc_FFC653C0\n"
                "CMP     R0, R1\n"
                "BNE     loc_FFC65380\n"
                "LDR     R1, =0xFFC654B4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC653DC\n"
                "B       loc_FFC653B8\n"
"loc_FFC65380:\n"
                "CMP     R2, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC653A4\n"
                "LDR     R1, =0xFFC654C4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC65404\n"
                "B       loc_FFC653B8\n"
"loc_FFC653A4:\n"
                "LDR     R1, =0xFFC654D4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BEQ     loc_FFC65420\n"
"loc_FFC653B8:\n"
                "BL      sub_FFC666B0_my\n"   //--------------->
                "B       loc_FFC6542C\n"
"loc_FFC653C0:\n"
                "CMP     R0, R1\n"
                "BNE     loc_FFC653E4\n"
                "LDR     R1, =0xFFC654E4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BNE     loc_FFC65428\n"
"loc_FFC653DC:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC66638\n"
"loc_FFC653E4:\n"
                "CMP     R2, R0,LSL#17\n"
                "TSTNE   R0, #0xC00\n"
                "BEQ     loc_FFC6540C\n"
                "LDR     R1, =0xFFC654F4\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BNE     loc_FFC65428\n"
"loc_FFC65404:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC666DC\n"
"loc_FFC6540C:\n"
                "LDR     R1, =0xFFC6540C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "CMP     R4, #1\n"
                "BNE     loc_FFC65428\n"
"loc_FFC65420:\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "B       sub_FFC6668C\n"
"loc_FFC65428:\n"
                "BL      sub_FFC66664\n"
"loc_FFC6542C:\n"
                "CMP     R4, #0\n"
                "LDMNEFD SP!, {R4-R6,PC}\n"
"loc_FFC65434:\n"
                "STRH    R5, [R6,#2]\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC666B0_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC668C0\n"
                "MOV     R0, #0x20\n"
                "BL      sub_FFC59F24\n"
                "LDR     R0, =0x607C\n"
                "LDR     R0, [R0,#0x2C]\n"
                "CMP     R0, #0\n"
                "BLNE    sub_FFC67580\n"
                "LDMFD   SP!, {R4,LR}\n"
                "MOV     R0, #0\n"
                "B       sub_FFC69A84_my\n" //------------->
 );
} 




void __attribute__((naked,noinline)) sub_FFC69A84_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R4, =0x623C\n"
                "MOV     R0, #0\n"
                "STR     R0, [R4,#0x30]\n"
                "LDR     R0, [R4,#8]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC69AB0\n"
                "LDR     R0, =sub_FFC69690_my\n"    //----------------->
                "MOV     R1, #0\n"
                "BL      sub_FFC5CF00\n"
                "STR     R0, [R4,#8]\n"
"loc_FFC69AB0:\n"
                "LDR     R0, [R4,#0xC]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC69ACC\n"
                "LDR     R0, =0xFFC69330\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC66258\n"
                "STR     R0, [R4,#0xC]\n"
"loc_FFC69ACC:\n"
                "BL      sub_FFC6A258\n"
                "BL      sub_FFC69394\n"
                "BL      sub_FFD39A30\n"
                "BL      sub_FFD3D3B0\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFD2EC90\n"
 );
} 




void __attribute__((naked,noinline)) sub_FFC69690_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R11,LR}\n"
                "LDR     R5, =0x623C\n"
                "MOV     R4, R1\n"
                "LDR     R2, [R5,#0x2C]\n"
                "ADD     R0, R5, #0\n"
                "LDR     R0, [R0,#0x14]\n"
                "LDR     R9, =0x3007\n"
                "CMP     R2, #0\n"
                "MOV     R1, #0\n"
                "MOV     R11, R3\n"
                "MVN     R8, #0\n"
                "BEQ     loc_FFC69708\n"
                "CMP     R4, R9\n"
                "BEQ     loc_FFC698F8\n"
                "CMP     R4, #0x800\n"
                "LDREQ   R2, [R5,#0x38]\n"
                "CMPEQ   R11, R2\n"
                "BNE     loc_FFC69A08\n"
                "STR     R1, [R5,#0x2C]!\n"
                "CMP     R0, #0\n"
                "STR     R8, [R5,#0xC]\n"
                "BNE     loc_FFC69A7C\n"
                "BL      sub_FFC1CE60\n"
                "CMP     R0, #1\n"
                "BEQ     loc_FFC69700\n"
                "BL      sub_FFC1CE68\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC69A7C\n"
"loc_FFC69700:\n"
                "BL      sub_FFC694E0\n"
                "B       loc_FFC69A7C\n"
"loc_FFC69708:\n"
                "CMP     R0, #1\n"
                "SUBEQ   R12, R4, #0x2000\n"
                "SUBEQS  R12, R12, #0x1C\n"
                "BNE     loc_FFC69724\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC69D08\n"
                "B       loc_FFC69A7C\n"
"loc_FFC69724:\n"
                "BL      sub_FFC755F0\n"
                "LDR     R10, =0x9A5\n"
                "CMP     R0, #1\n"
                "SUB     R6, R10, #4\n"
                "SUB     R7, R10, #2\n"
                "BNE     loc_FFC69758\n"
                "CMP     R4, R10\n"
                "CMPNE   R4, R6\n"
                "CMPNE   R4, R7\n"
                "BNE     loc_FFC69758\n"
                "BL      sub_FFC74780\n"
                "STR     R4, [R5,#0x3C]\n"
                "B       loc_FFC69A08\n"
"loc_FFC69758:\n"
                "BL      sub_FFD2D064\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC69778\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC5D43C\n"
                "CMP     R0, #1\n"
                "CMPNE   R4, R10\n"
                "BEQ     loc_FFC69A08\n"
"loc_FFC69778:\n"
                "BL      sub_FFC1CF88\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC69790\n"
                "CMP     R4, R6\n"
                "CMPNE   R4, R7\n"
                "BEQ     loc_FFC69A7C\n"
"loc_FFC69790:\n"
                "BL      sub_FFC66430\n"
                "LDR     R1, =0x9A2\n"
                "CMP     R0, #1\n"
                "ADD     R2, R1, #2\n"
                "BNE     loc_FFC697B8\n"
                "CMP     R4, R6\n"
                "CMPNE   R4, R1\n"
                "CMPNE   R4, R7\n"
                "CMPNE   R4, R2\n"
                "BEQ     loc_FFC69A7C\n"
"loc_FFC697B8:\n"
                "LDR     R12, =0x200A\n"
                "CMP     R4, R12\n"
                "BEQ     loc_FFC69A6C\n"
                "BGT     loc_FFC69834\n"
                "LDR     R12, =0x907\n"
                "CMP     R4, R12\n"
                "MOVEQ   R1, #2\n"
                "MOVEQ   R0, R10\n"
                "BEQ     loc_FFC699A8\n"
                "BGT     loc_FFC69810\n"
                "SUB     R12, R4, #0x800\n"
                "LDR     R6, =0x2003\n"
                "SUBS    R12, R12, #0x26\n"
                "BEQ     loc_FFC6990C\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x29\n"
                "BEQ     loc_FFC69950\n"
                "CMP     R4, #0x860\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x61\n"
                "BNE     loc_FFC69A20\n"
                "B       loc_FFC69A08\n"
"loc_FFC69810:\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC699A0\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC69A6C\n"
                "CMP     R4, R7\n"
                "BEQ     loc_FFC699A0\n"
                "CMP     R4, R2\n"
                "BEQ     loc_FFC69A6C\n"
                "B       loc_FFC69A20\n"
"loc_FFC69834:\n"
                "LDR     R12, =0x3149\n"
                "CMP     R4, R12\n"
                "MOVEQ   R1, #0\n"
                "MOVEQ   R0, #0x84\n"
                "BEQ     loc_FFC69A18\n"
                "BGT     loc_FFC6988C\n"
                "SUB     R12, R4, #0x2000\n"
                "SUBS    R12, R12, #0x20\n"
                "MOVEQ   R1, R11\n"
                "MOVEQ   R0, #0x83\n"
                "BEQ     loc_FFC69A18\n"
                "CMP     R4, R9\n"
                "BEQ     loc_FFC698E4\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x35\n"
                "BEQ     loc_FFC698C8\n"
                "SUB     R12, R4, #0x3000\n"
                "SUBS    R12, R12, #0x148\n"
                "BNE     loc_FFC69A20\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x86\n"
                "B       loc_FFC69A18\n"
"loc_FFC6988C:\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x4A\n"
                "BEQ     loc_FFC69A10\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #3\n"
                "BEQ     loc_FFC699CC\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #8\n"
                "BEQ     loc_FFC699B0\n"
                "SUB     R12, R4, #0x4000\n"
                "SUBS    R12, R12, #0xF\n"
                "BNE     loc_FFC69A20\n"
                "MOV     R0, #0x82\n"
                "BL      sub_FFC6A818\n"
                "B       loc_FFC69A7C\n"
"loc_FFC698C8:\n"
                "BL      sub_FFC6A28C\n"
                "CMP     R0, #4\n"
                "BEQ     loc_FFC69A6C\n"
                "LDR     R0, [R5,#0x1C]\n"
                "CMP     R0, #0\n"
                "BLNE    sub_FFC69428\n"
                "B       loc_FFC69A7C\n"
"loc_FFC698E4:\n"
                "MOV     R0, #1\n"
                "STR     R0, [R5,#0x1C]\n"
                "LDR     R0, [R5,#0x18]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC69900\n"
"loc_FFC698F8:\n"
                "BL      sub_FFC69428\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC69900:\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC69600\n"
                "B       loc_FFC69A7C\n"
"loc_FFC6990C:\n"
                "BL      sub_FFC66430\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC69924\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC66424\n"
                "B       loc_FFC69A7C\n"
"loc_FFC69924:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORR     R0, R0, R1\n"
                "LDR     R1, [R5,#0x1C]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC69A7C\n"
                "MOV     R1, #0\n"
                "MOV     R0, R6\n"
                "BL      sub_FFC4BB28\n"
                "BL      sub_FFD60BA8\n"
                "B       loc_FFC69A7C\n"
"loc_FFC69950:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC69A7C\n"
                "BL      sub_FFC6643C\n"
                "CMP     R0, #0\n"
                "LDREQ   R0, [R5,#0x1C]\n"
                "CMPEQ   R0, #0\n"
                "BNE     loc_FFC69A7C\n"
                "BL      sub_FFC66430\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC69A7C\n"
                "BL      sub_FFD3D458\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC69A7C\n"
                "MOV     R1, #0\n"
                "MOV     R0, R6\n"
                "BL      sub_FFC4BB28\n"
                "BL      sub_FFD229AC\n"
                "B       loc_FFC69A7C\n"
"loc_FFC699A0:\n"
                "MOV     R1, #1\n"
                "MOV     R0, R4\n"
"loc_FFC699A8:\n"
                "BL      sub_FFC6953C_my\n"   //-------------->
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC699B0:\n"
                "MOV     R0, R11\n"
                "BL      sub_FFC64CCC\n"
                "CMP     R0, #0\n"
                "MOVEQ   R1, R11\n"
                "MOVEQ   R0, R4\n"
                "BLEQ    sub_FFC69EF8_my\n"   //-------------->
                "B       loc_FFC69A08\n"
"loc_FFC699CC:\n"
                "LDR     R0, [R5,#0x3C]\n"
                "CMN     R0, #1\n"
                "BEQ     loc_FFC69A08\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC73804\n"
                "LDR     R0, [R5,#0x3C]\n"
                "CMP     R0, R6\n"
                "BNE     loc_FFC699F8\n"
                "BL      sub_FFC1CE60\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC69A04\n"
"loc_FFC699F8:\n"
                "LDR     R0, [R5,#0x3C]\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC5D6B0\n"
"loc_FFC69A04:\n"
                "STR     R8, [R5,#0x3C]\n"
"loc_FFC69A08:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC69A10:\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x85\n"
"loc_FFC69A18:\n"
                "BL      sub_FFC6A7D8\n"
                "B       loc_FFC69A7C\n"
"loc_FFC69A20:\n"
                "LDR     R12, =0x855\n"
                "CMP     R4, R12\n"
                "BEQ     loc_FFC69A5C\n"
                "BGT     loc_FFC69A48\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x38\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x39\n"
                "BNE     loc_FFC69A6C\n"
                "B       loc_FFC69A5C\n"
"loc_FFC69A48:\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x56\n"
                "SUBNE   R12, R4, #0x800\n"
                "SUBNES  R12, R12, #0x5D\n"
                "BNE     loc_FFC69A6C\n"
"loc_FFC69A5C:\n"
                "LDR     R0, [R5,#0x10]\n"
                "LDR     R1, [R5,#0x14]\n"
                "ORRS    R0, R0, R1\n"
                "BNE     loc_FFC69A7C\n"
"loc_FFC69A6C:\n"
                "MOV     R1, R11\n"
                "MOV     R0, R4\n"
                "BL      sub_FFC69EF8_my\n"    //---------------->
                "LDMFD   SP!, {R3-R11,PC}\n"
"loc_FFC69A7C:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R3-R11,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC6953C_my(){
asm volatile(
                "STMFD   SP!, {R4-R6,LR}\n"
                "MOV     R4, R0\n"
                "LDR     R0, =0x623C\n"
                "MOV     R5, R1\n"
                "LDR     R0, [R0,#0x1C]\n"
                "CMP     R0, #0\n"
                "LDRNE   R1, =0xFFC6966C\n"
                "BNE     loc_FFC695E8\n"
                "BL      sub_FFC6A298\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC69578\n"
"loc_FFC69568:\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R6,LR}\n"
                "MOV     R1, #0\n"
                "B       sub_FFC69EF8_my\n"  //--------------->
"loc_FFC69578:\n"
                "CMP     R5, #2\n"
                "BNE     loc_FFC69590\n"
                "BL      sub_FFC68A8C\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC695D8\n"
                "B       loc_FFC695A4\n"
"loc_FFC69590:\n"
                "CMP     R5, #1\n"
                "BNE     loc_FFC695D8\n"
                "BL      sub_FFC68AA4\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC695D8\n"
"loc_FFC695A4:\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC73804\n"
                "SUB     R12, R4, #0x900\n"
                "SUBS    R12, R12, #0xA1\n"
                "SUBNE   R12, R4, #0x900\n"
                "SUBNES  R12, R12, #0xA3\n"
                "SUBNE   R12, R4, #0x900\n"
                "SUBNES  R12, R12, #0xA5\n"
                "LDREQ   R0, =0xC507\n"
                "MOVEQ   R1, #0\n"
                "BLEQ    sub_FFC4BB28\n"
"loc_FFC695D0:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4-R6,PC}\n"
"loc_FFC695D8:\n"
                "BL      sub_FFC694E0\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC695F4\n"
                "LDR     R1, =0xFFC6967C\n"
"loc_FFC695E8:\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "B       loc_FFC695D0\n"
"loc_FFC695F4:\n"
                "MOV     R0, R5\n"
                "BL      sub_FFD2BE00\n"
                "B       loc_FFC69568\n"
 );
}





void __attribute__((naked,noinline)) sub_FFC69EF8_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "MOV     R7, R1\n"
                "MOV     R4, R0\n"
                "BL      sub_FFC6A314\n"
                "LDR     R5, =0x6280\n"
                "LDR     R3, =0x200A\n"
                "LDR     R12, [R5]\n"
                "LDR     R2, =0x4008\n"
                "LDR     R6, =0x9A3\n"
                "LDR     R0, =0x3007\n"
                "LDR     R1, =0x1051\n"
                "CMP     R12, #9\n"
                "ADD     LR, R3, #0x15\n"
                "ADDLS   PC, PC, R12,LSL#2\n"
                "B       loc_FFC6A250\n"
"loc_FFC69F34:\n"
                "B       loc_FFC69F5C\n"
"loc_FFC69F38:\n"
                "B       loc_FFC69F6C\n"
"loc_FFC69F3C:\n"
                "B       loc_FFC69F7C\n"
"loc_FFC69F40:\n"
                "B       loc_FFC69FF0\n"
"loc_FFC69F44:\n"
                "B       loc_FFC6A030\n"
"loc_FFC69F48:\n"
                "B       loc_FFC6A0B8\n"
"loc_FFC69F4C:\n"
                "B       loc_FFC6A0E8\n"
"loc_FFC69F50:\n"
                "B       loc_FFC6A198\n"
"loc_FFC69F54:\n"
                "B       loc_FFC6A0F8\n"
"loc_FFC69F58:\n"
                "B       loc_FFC6A1C0\n"
"loc_FFC69F5C:\n"
                "MOV     R1, R7\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R8,LR}\n"
                "B       sub_FFC69E80\n"
"loc_FFC69F6C:\n"
                "MOV     R1, R7\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4-R8,LR}\n"
                "B       sub_FFC6A490_my\n"   //---------------->
"loc_FFC69F7C:\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC69FE0\n"
                "SUB     R12, R4, #0x2000\n"
                "SUBS    R12, R12, #6\n"
                "BEQ     loc_FFC69FA4\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC69FE8\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x4B\n"
                "BNE     loc_FFC6A250\n"
"loc_FFC69FA4:\n"
                "BL      sub_FFC694BC\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC6A2FC\n"
                "LDR     R0, [R5,#8]\n"
                "CMP     R0, #0\n"
                "MOVNE   R1, #0\n"
                "MOVNE   R0, R6\n"
                "BNE     loc_FFC69FD8\n"
                "LDR     R0, [R5,#4]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC6A200\n"
                "LDR     R0, =0x9A1\n"
                "MOV     R1, #0\n"
"loc_FFC69FD8:\n"
                "BL      sub_FFC69E80\n"
                "B       loc_FFC6A200\n"
"loc_FFC69FE0:\n"
                "BL      sub_FFC6A404\n"
                "B       loc_FFC6A200\n"
"loc_FFC69FE8:\n"
                "BL      sub_FFC6A41C\n"
                "B       loc_FFC6A200\n"
"loc_FFC69FF0:\n"
                "SUB     R12, R4, #0x900\n"
                "SUBS    R12, R12, #0xA2\n"
                "BEQ     loc_FFC6A020\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC6A018\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6A028\n"
                "CMP     R4, R0\n"
                "BLEQ    sub_FFC6A41C\n"
                "B       loc_FFC6A250\n"
"loc_FFC6A018:\n"
                "BL      sub_FFC69E24_my\n"  //------------->
                "B       loc_FFC6A250\n"
"loc_FFC6A020:\n"
                "BL      sub_FFC6A3E4\n"
                "B       loc_FFC6A250\n"
"loc_FFC6A028:\n"
                "BL      sub_FFC6A404\n"
                "B       loc_FFC6A250\n"
"loc_FFC6A030:\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6A08C\n"
                "BGT     loc_FFC6A058\n"
                "CMP     R4, R6\n"
                "BEQ     loc_FFC6A074\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6A0A4\n"
"loc_FFC6A04C:\n"
                "CMP     R4, R3\n"
                "BNE     loc_FFC6A250\n"
                "B       loc_FFC6A068\n"
"loc_FFC6A058:\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6A098\n"
"loc_FFC6A060:\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC6A250\n"
"loc_FFC6A068:\n"
                "BL      sub_FFC6A46C\n"
                "BL      sub_FFC6A3E4\n"
                "B       loc_FFC6A200\n"
"loc_FFC6A074:\n"
                "BL      sub_FFC18898\n"
                "MOV     R0, #5\n"
                "BL      sub_FFC6A2FC\n"
                "MOV     R0, #0\n"
                "STR     R0, [R5,#0xC]\n"
                "B       loc_FFC6A200\n"
"loc_FFC6A08C:\n"
                "MOV     R0, #5\n"
                "BL      sub_FFC6A2FC\n"
                "B       loc_FFC6A0DC\n"
"loc_FFC6A098:\n"
                "BL      sub_FFC18898\n"
                "BL      sub_FFC6A46C\n"
                "B       loc_FFC6A190\n"
"loc_FFC6A0A4:\n"
                "BL      sub_FFC18898\n"
                "BL      sub_FFC6A46C\n"
                "B       loc_FFC6A0F0\n"
"loc_FFC6A0B0:\n"
                "BL      sub_FFC6A2FC\n"
                "B       loc_FFC6A200\n"
"loc_FFC6A0B8:\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6A0DC\n"
                "BGT     loc_FFC6A0D0\n"
                "CMP     R4, R1\n"
                "BNE     loc_FFC6A04C\n"
                "B       loc_FFC6A0F0\n"
"loc_FFC6A0D0:\n"
                "CMP     R4, R0\n"
                "BNE     loc_FFC6A060\n"
                "B       loc_FFC6A190\n"
"loc_FFC6A0DC:\n"
                "MOV     R0, R7\n"
                "BL      sub_FFC6A438\n"
                "B       loc_FFC6A200\n"
"loc_FFC6A0E8:\n"
                "CMP     R4, R1\n"
                "BNE     loc_FFC6A250\n"
"loc_FFC6A0F0:\n"
                "MOV     R0, #8\n"
                "B       loc_FFC6A0B0\n"
"loc_FFC6A0F8:\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6A190\n"
                "BGT     loc_FFC6A17C\n"
                "CMP     R4, R3\n"
                "BEQ     loc_FFC69FE0\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6A0DC\n"
                "B       loc_FFC6A250\n"
"loc_FFC6A17C:\n"
                "CMP     R4, R2\n"
                "SUBNE   R12, R4, #0x4000\n"
                "SUBNES  R12, R12, #0xE\n"
                "BEQ     loc_FFC69FE0\n"
                "B       loc_FFC6A250\n"
"loc_FFC6A190:\n"
                "MOV     R0, #7\n"
                "B       loc_FFC6A0B0\n"
"loc_FFC6A198:\n"
                "CMP     R4, R3\n"
                "BEQ     loc_FFC6A1B0\n"
                "CMP     R4, LR\n"
                "BEQ     loc_FFC6A0DC\n"
                "CMP     R4, R2\n"
                "BNE     loc_FFC6A250\n"
"loc_FFC6A1B0:\n"
                "BL      sub_FFC6A3E4\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC69600\n"
                "B       loc_FFC6A200\n"
"loc_FFC6A1C0:\n"
                "SUB     R12, R4, #0x800\n"
                "SUBS    R12, R12, #0x4A\n"
                "BEQ     loc_FFC6A208\n"
                "CMP     R4, R1\n"
                "BEQ     loc_FFC6A240\n"
                "CMP     R4, R0\n"
                "BEQ     loc_FFC6A230\n"
                "SUB     R12, R4, #0x3100\n"
                "SUBS    R12, R12, #0x2A\n"
                "BNE     loc_FFC6A250\n"
                "BL      sub_FFC6A39C\n"
                "LDR     R0, [R5,#0x14]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC6A200\n"
                "BL      sub_FFC6A3B8_my\n"  //---------------->
                "BL      sub_FFD2D070\n"
"loc_FFC6A200:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC6A208:\n"
                "BL      sub_FFC6A39C\n"
                "LDR     R0, =0x8007\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC6027C\n"
                "BL      sub_FFD2BDA0\n"
                "BL      sub_FFC6A3E4\n"
                "BL      sub_FFD2D070\n"
                "BL      sub_FFC694BC\n"
                "MOV     R0, #0\n"
                "B       loc_FFC6A0B0\n"
"loc_FFC6A230:\n"
                "BL      sub_FFC6A39C\n"
                "BL      sub_FFD2BDA0\n"
                "BL      sub_FFD2D070\n"
                "B       loc_FFC69FE8\n"
"loc_FFC6A240:\n"
                "BL      sub_FFC6A39C\n"
                "BL      sub_FFD2BDA0\n"
                "BL      sub_FFD2D070\n"
                "B       loc_FFC69FE0\n"
"loc_FFC6A250:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4-R8,PC}\n"

                ".ltorg\n"  
 );
} 





void __attribute__((naked,noinline)) sub_FFC6A490_my(){ 
 asm volatile(
                "LDR     R3, =0x6280\n"
                "LDR     R12, =0x2006\n"
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, [R3,#0xC]\n"
                "LDR     R2, [R3,#0x14]\n"
                "CMP     R0, R12\n"
                "BEQ     loc_FFC6A504\n"
                "BGT     loc_FFC6A4D0\n"
                "SUB     R12, R0, #0x900\n"
                "SUBS    R12, R12, #0xA2\n"
                "BEQ     loc_FFC6A528\n"
                "SUB     R12, R0, #0x1000\n"
                "SUBS    R12, R12, #0x51\n"
                "BNE     loc_FFC6A54C\n"
                "BL      sub_FFC6A404\n"
                "B       loc_FFC6A544\n"
"loc_FFC6A4D0:\n"
                "SUB     R12, R0, #0x3000\n"
                "SUBS    R12, R12, #7\n"
                "BEQ     loc_FFC6A540\n"
                "SUB     R12, R0, #0x3100\n"
                "SUBS    R12, R12, #0x4B\n"
                "BNE     loc_FFC6A54C\n"
                "CMP     R2, #0\n"
                "BNE     loc_FFC6A544\n"
                "LDR     R0, [R3,#8]\n"
                "ORRS    R0, R0, R1\n"
                "BEQ     loc_FFC6A510\n"
                "BL      sub_FFC69E24_my\n"  //---------------->
                "B       loc_FFC6A544\n"
"loc_FFC6A504:\n"
                "CMP     R2, #0\n"
                "BLEQ    sub_FFC68B30\n"
                "B       loc_FFC6A544\n"
"loc_FFC6A510:\n"
                "LDR     R0, [R3,#4]\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #3\n"
                "BNE     loc_FFC6A538\n"
                "BL      sub_FFC6A3E4\n"
                "B       loc_FFC6A544\n"
"loc_FFC6A528:\n"
                "CMP     R1, #0\n"
                "BNE     loc_FFC6A544\n"
                "BL      sub_FFC1840C\n"
                "MOV     R0, #2\n"
"loc_FFC6A538:\n"
                "BL      sub_FFC6A2FC\n"
                "B       loc_FFC6A544\n"
"loc_FFC6A540:\n"
                "BL      sub_FFC6A540\n"
"loc_FFC6A544:\n"
                "MOV     R0, #0\n"
                "LDMFD   SP!, {R4,PC}\n"
"loc_FFC6A54C:\n"
                "MOV     R0, #1\n"
                "LDMFD   SP!, {R4,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC69E24_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC6A118\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "LDR     R4, =0x6280\n"
                "LDR     R0, [R4,#0x10]\n"
                "CMP     R0, #0\n"
                "LDMEQFD SP!, {R4,LR}\n"
                "BEQ     sub_FFC6A3B8_my\n"  //--------------->
                "LDR     R1, =0xFFC6A134\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "BL      sub_FFD2D09C\n"
                "LDR     R0, [R4,#0x18]\n"
                "CMP     R0, #1\n"
                "MOVNE   R0, #1\n"
                "STRNE   R0, [R4,#0x18]\n"
                "BLNE    sub_FFC5F714\n"
                "MOV     R0, #9\n"
                "BL      sub_FFC6A2FC\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFD2BC5C\n"

 );
} 





void __attribute__((naked,noinline)) sub_FFC6A3B8_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "LDR     R1, =0xFFC6A56C\n"
                "MOV     R0, #0x60\n"
                "BL      sub_FFC59F24\n"
                "LDR     R1, =0x6280\n"
                "MOV     R0, #0\n"
                "STR     R0, [R1,#0xC]\n"
                "MOV     R0, #4\n"
                "BL      sub_FFC6A2FC\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC69B24_my\n"   //--------------->

 );
} 



void __attribute__((naked,noinline)) sub_FFC69B24_my(){ 
 asm volatile(
                "LDR     R0, =0x623C\n"
                "STMFD   SP!, {R3,LR}\n"
                "LDR     R1, [R0,#0x40]\n"
                "CMP     R1, #1\n"
                "MOVNE   R1, #1\n"
                "STRNE   R1, [R0,#0x40]\n"
                "BLNE    sub_FFC5F714\n"
                "MOV     R1, #0\n"
                "MOV     R0, #0x80\n"
                "BL      sub_FFC6A7D8\n"
                "MOV     R2, #2\n"
                "MOV     R1, SP\n"
                "MOV     R0, #0x6B\n"
                "BL      sub_FFC5BC8C\n"
                "MOV     R2, #2\n"
                "MOV     R1, SP\n"
                "MOV     R0, #0xA3\n"
                "BL      sub_FFC5BB84\n"
                "BL      sub_FFC4BC14\n"
                "BL      sub_FFC68DC0\n"
                "BL      sub_FFC18860_my\n"   //---------------->
                "BL      sub_FFC69474\n"
                "LDMFD   SP!, {R12,PC}\n"
 );
} 





void __attribute__((naked,noinline)) sub_FFC18860_my(){ 
 asm volatile(
                "STMFD   SP!, {R4,LR}\n"
                "MOV     R4, R0\n"
                "MOV     R0, #0x20\n"
                "LDR     R1, =0xFFC1898C\n"
                "BL      sub_FFC59F24\n"
                "BL      sub_FFC18FD4\n"
                "CMP     R0, #0\n"
                "LDMNEFD SP!, {R4,PC}\n"
                "MOV     R0, #4\n"
                "BL      sub_FFC494FC\n"
                "BL      sub_FFC4CF14\n"
                "MOV     R0, R4\n"
                "LDMFD   SP!, {R4,LR}\n"
                "B       sub_FFC4F518_my\n"  //----------->
 );
} 




void __attribute__((naked,noinline)) sub_FFC4F518_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "MOV     R8, R0\n"
                "MOV     R0, #0x41\n"
                "SUB     SP, SP, #0x38\n"
                "MOV     R5, #0\n"
                "STR     R0, [SP,#0x34]\n"
                "BL      sub_FFC4F4E8\n"
                "CMP     R0, #0\n"
                "LDRNE   R1, =0x13B\n"
                "BNE     loc_FFC4F6C4\n"
                "LDR     R4, =0x56D8\n"
                "MOV     R1, #0x1E\n"
                "LDR     R0, [R4,#0xC]\n"
                "BL      sub_FFC19408\n"
                "BL      sub_FFC5BE1C\n"
                "STR     R0, [R4,#4]\n"
                "MOV     R0, #0\n"
                "BL      sub_FFC57F6C\n"
                "STR     R0, [SP,#0x28]\n"
                "ADD     R0, SP, #0x28\n"
                "MOV     R1, SP\n"
                "BL      sub_FFC580B8\n"
                "MOV     R0, SP\n"
                "BL      sub_FFC57FA0\n"
                "STR     R0, [SP,#0x2C]\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x34\n"
                "BL      sub_FFC5C13C\n"
                "LDR     R7, [SP,#0x2C]\n"
                "BL      sub_FFC4FA40\n"
                "MOV     R6, #0\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "STR     R6, [SP,#0x2C]\n"
                "STR     R6, [SP,#0x28]\n"
                "BL      sub_FFC225AC\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x2F\n"
                "BL      sub_FFC5C13C\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0x2D\n"
                "BL      sub_FFC5C13C\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "BL      sub_FFC25D0C\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0x30\n"
                "BL      sub_FFC5C13C\n"
                "ADD     R1, SP, #0x28\n"
                "ADD     R0, SP, #0x2C\n"
                "BL      sub_FFC22D70\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x28\n"
                "MOV     R1, #0x2E\n"
                "BL      sub_FFC5C13C\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #2\n"
                "ADD     R2, SP, #0x2C\n"
                "MOV     R1, #0xB8\n"
                "BL      sub_FFC5C1E8\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x11D\n"
                "LDRNE   R0, =0xFFC4F93C\n"
                "BLNE    sub_FFC0C090\n"
                "LDRH    R0, [SP,#0x2C]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x28\n"
                "CMP     R0, #0\n"
                "MOVNE   R0, #1\n"
                "STR     R0, [SP,#0x28]\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R1, #0x92\n"
                "BL      sub_FFC5C13C\n"
                "MOV     R2, #1\n"
                "ADD     R1, SP, #0x34\n"
                "MOV     R0, #0xFA\n"
                "BL      sub_FFC5BC8C\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x152\n"
                "LDRNE   R0, =0xFFC4F93C\n"
                "BLNE    sub_FFC0C090\n"
                "LDRB    R0, [SP,#0x34]\n"
                "MOV     R3, R8\n"
                "MOV     R2, #0x14\n"
                "AND     R1, R0, #0xFF\n"
                "ADD     R0, SP, #0x30\n"
                "STR     R7, [SP]\n"
                "BL      sub_FFCF0BF0\n"
                "TST     R0, #1\n"
                "LDRNE   R1, =0x156\n"
                "BNE     loc_FFC4F6C4\n"
                "LDR     R0, =0x1986C\n"
                "LDR     R1, [SP,#0x30]\n"
                "MOV     R2, #0x10\n"
                "BL      sub_FFCE70B4\n"
                "TST     R0, #1\n"
                "BEQ     loc_FFC4F6D4\n"
                "LDR     R1, =0x15E\n"
"loc_FFC4F6C4:\n"
                "LDR     R0, =0xFFC4F93C\n"
                "BL      sub_FFC0C090\n"
"loc_FFC4F6CC:\n"
                "ADD     SP, SP, #0x38\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC4F6D4:\n"
                "LDR     R0, [R4,#4]\n"
                "MOV     R3, #4\n"
                "ADD     R2, SP, #0x30\n"
                "MOV     R1, #0x2B\n"
                "BL      sub_FFC5C13C\n"
                "BL      sub_FFC6BB3C\n"
                "LDRSB   R1, [SP,#0x34]\n"
                "CMP     R0, R1\n"
                "MOVEQ   R7, #0\n"
                "BEQ     loc_FFC4F728\n"
                "LDR     R5, =0x1986C\n"
                "MOV     R0, R5\n"
                "BL      sub_FFC6BCB8\n"
                "MOV     R8, R0\n"
                "BL      sub_FFC9D474\n"
                "CMP     R8, R0\n"
                "MOV     R7, R0\n"
                "LDRLS   R1, =0x16B\n"
                "LDRLS   R0, =0xFFC4F93C\n"
                "BLLS    sub_FFC0C090\n"
                "SUB     R7, R8, R7\n"
"loc_FFC4F728:\n"
                "BL      sub_FFC4AF1C_my\n"  //---------------->
                "LDR     R0, =0x19890\n"
                "LDRH    R3, [R0,#0x46]\n"
                "LDRH    R2, [R0,#0x44]\n"
                "LDR     R1, [R0,#0x40]\n"
                "LDR     R0, [R0,#0x3C]\n"
                "BL      sub_FFC49F9C\n"
                "MOV     R3, #0\n"
                "LDR     R2, =0xFFC4F4B0\n"
                "MOV     R1, #0\n"
                "LDR     R0, =0xFFC4F4C4\n"
                "ADD     R8, SP, #0xC\n"
                "STMIA   R8, {R0-R3}\n"
                "LDR     R2, =0xFFC4F4D4\n"
                "LDR     R1, =0xFFC4F4C0\n"
                "STMEA   SP, {R1-R3}\n"
                "LDR     R1, [R4,#4]\n"
                "MOV     R3, R6\n"
                "MOV     R2, R7\n"
                "MOV     R0, R5\n"
                "BL      sub_FFC4A2F8\n"
                "LDR     R0, [R4,#0xC]\n"
                "MOV     R1, #0x20\n"
                "BL      sub_FFC193D4\n"
                "B       loc_FFC4F6CC\n"
 );
} 



void __attribute__((naked,noinline)) sub_FFC4AF1C_my(){ 
 asm volatile(
                "STMFD   SP!, {R3-R9,LR}\n"
                "LDR     R5, =0x5550\n"
                "MOV     R6, #0\n"
                "STR     R6, [R5,#0x20]\n"
                "LDR     R0, [R5,#4]\n"
                "LDR     R8, =0x2710\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC4AFD4\n"
                "MOV     R0, #1\n"
                "STR     R0, [R5,#4]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC0BF0C\n"
                "STR     R0, [R5,#0x10]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0\n"
                "BL      sub_FFC0BF0C\n"
                "STR     R0, [R5,#0x14]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0xA\n"
                "BL      sub_FFC0BEC4\n"
                "STR     R0, [R5,#0x18]\n"
                "MOV     R0, #0\n"
                "MOV     R1, #0xA\n"
                "BL      sub_FFC0BEC4\n"
                "LDR     R7, =0x19450\n"
                "MOV     R4, #9\n"
                "ADD     R9, R4, #0x2D4\n"
                "STR     R0, [R5,#0x1C]\n"
"loc_FFC4AF90:\n"
                "RSB     R0, R4, R4,LSL#3\n"
                "STR     R6, [R7,R0,LSL#2]\n"
                "ADD     R1, R7, R0,LSL#2\n"
                "STR     R9, [SP]\n"
                "LDR     R0, [R5,#0x1C]\n"
                "LDR     R3, =0xFFC4A298\n"
                "MOV     R2, R8\n"
                "BL      sub_FFC0BFD0\n"
                "SUBS    R4, R4, #1\n"
                "BPL     loc_FFC4AF90\n"
                "MOV     R3, #0\n"
                "STR     R3, [SP]\n"
                "LDR     R3, =MovieRecordTask_my\n"
                "MOV     R2, #0x1000\n"
                "MOV     R1, #0x14\n"
                "LDR     R0, =0xFFC4B124\n"
                "BL      sub_FFC0BE90\n"
"loc_FFC4AFD4:\n"
                "BL      sub_FFD1258C\n"
                "BL      sub_FFC4B038\n"
                "MOV     R1, R0\n"
                "MOV     R0, #0xB\n"
                "ADD     R3, R0, #0x2DC\n"
                "STR     R0, [R1]\n"
                "STR     R3, [SP]\n"
                "LDR     R3, =0xFFC4A298\n"
                "MOV     R2, R8\n"
                "LDR     R0, [R5,#0x18]\n"
                "BL      sub_FFC0BFD0\n"
                "LDMFD   SP!, {R3-R9,PC}\n"
 );
} 


void __attribute__((naked,noinline)) MovieRecordTask_my(){ 
 asm volatile(
                "STMFD   SP!, {R2-R8,LR}\n"
                "LDR     R8, =0x32B\n"
                "LDR     R7, =0x2710\n"
                "LDR     R4, =0x5550\n"
                "MOV     R6, #0\n"
                "MOV     R5, #1\n"
"loc_FFC4AE2C:\n"
                "LDR     R0, [R4,#0x18]\n"
                "MOV     R2, #0\n"
                "ADD     R1, SP, #4\n"
                "BL      sub_FFC19658\n"
                "LDR     R0, [R4,#0x20]\n"
                "CMP     R0, #0\n"
                "BNE     loc_FFC4AEFC\n"
                "LDR     R0, [SP,#4]\n"
                "LDR     R1, [R0]\n"
                "SUB     R1, R1, #2\n"
                "CMP     R1, #9\n"
                "ADDLS   PC, PC, R1,LSL#2\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AE60:\n"
                "B       loc_FFC4AEB0\n"
"loc_FFC4AE64:\n"
                "B       loc_FFC4AED0\n"
"loc_FFC4AE68:\n"
                "B       loc_FFC4AEE0\n"
"loc_FFC4AE6C:\n"
                "B       loc_FFC4AEE8\n"
"loc_FFC4AE70:\n"
                "B       loc_FFC4AEB8\n"
"loc_FFC4AE74:\n"
                "B       loc_FFC4AEF0\n"
"loc_FFC4AE78:\n"
                "B       loc_FFC4AEC0\n"
"loc_FFC4AE7C:\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AE80:\n"
                "B       loc_FFC4AEF8\n"
"loc_FFC4AE84:\n"
                "B       loc_FFC4AE88\n"
"loc_FFC4AE88:\n"
                "LDR     R0, =0xFFC4AB10\n"
                "STR     R6, [R4,#0x34]\n"
                "STR     R0, [R4,#0xA0]\n"
                "LDR     R0, =0xFFC4A588\n"
                "LDR     R2, =0xFFC4A4A4\n"
                "LDR     R1, =0x19578\n"
                "STR     R6, [R4,#0x24]\n"
                "BL      sub_FFC2C6CC\n"
                "STR     R5, [R4,#0x38]\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEB0:\n"
                "BL      unlock_optical_zoom\n" //  +
                "BL      sub_FFC4AC08\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEB8:\n"
                "BL      sub_FFC4A910_my\n"  //------------->
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEC0:\n"
                "LDR     R1, [R0,#0x10]\n"
                "LDR     R0, [R0,#4]\n"
                "BL      sub_FFD13198\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AED0 :\n"
                "LDR     R0, [R4,#0x38]\n"
                "CMP     R0, #5\n"
                "STRNE   R5, [R4,#0x28]\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEE0:\n"
                "BL      sub_FFC4A718\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEE8:\n"
                "BL      sub_FFC4A5D4\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEF0:\n"
                "BL      sub_FFC4A430\n"
                "B       loc_FFC4AEFC\n"
"loc_FFC4AEF8:\n"
                "BL      sub_FFC4B064\n"
"loc_FFC4AEFC:\n"
                "LDR     R1, [SP,#4]\n"
                "LDR     R3, =0xFFC4A298\n"
                "STR     R6, [R1]\n"
                "STR     R8, [SP]\n"
                "LDR     R0, [R4,#0x1C]\n"
                "MOV     R2, R7\n"
                "BL      sub_FFC0BFD0\n"
                "B       loc_FFC4AE2C\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFC4A910_my(){ 
 asm volatile(                                   	
                "STMFD   SP!, {R4-R8,LR}\n"
                "SUB     SP, SP, #0x40\n"
                "MOV     R6, #0\n"
                "LDR     R5, =0x5550\n"
                "MOV     R4, R0\n"
                "STR     R6, [SP,#0x30]\n"
                "STR     R6, [SP,#0x28]\n"
                "LDR     R0, [R5,#0x38]\n"
                "MOV     R8, #4\n"
                "CMP     R0, #3\n"
                "STREQ   R8, [R5,#0x38]\n"
                "LDR     R0, [R5,#0xA0]\n"
            //  "BLX     R0\n"
                ".long   0xE12FFF30\n"
                "LDR     R0, [R5,#0x38]\n"
                "CMP     R0, #4\n"
                "BNE     loc_FFC4A9E8\n"
                "ADD     R3, SP, #0x28\n"
                "ADD     R2, SP, #0x2C\n"
                "ADD     R1, SP, #0x30\n"
                "ADD     R0, SP, #0x34\n"
                "BL      sub_FFD1332C\n"
                "CMP     R0, #0\n"
                "MOV     R7, #1\n"
                "BNE     loc_FFC4A98C\n"
                "LDR     R1, [R5,#0x28]\n"
                "CMP     R1, #1\n"
                "BNE     loc_FFC4A9F0\n"
                "LDR     R1, [R5,#0x50]\n"
                "LDR     R2, [R5,#0x3C]\n"
                "CMP     R1, R2\n"
                "BCC     loc_FFC4A9F0\n"
"loc_FFC4A98C:\n"
                "CMP     R0, #0x80000001\n"
                "STREQ   R8, [R5,#0x54]\n"
                "BEQ     loc_FFC4A9C4\n"
                "CMP     R0, #0x80000003\n"
                "STREQ   R7, [R5,#0x54]\n"
                "BEQ     loc_FFC4A9C4\n"
                "CMP     R0, #0x80000005\n"
                "MOVEQ   R0, #2\n"
                "BEQ     loc_FFC4A9C0\n"
                "CMP     R0, #0x80000007\n"
                "STRNE   R6, [R5,#0x54]\n"
                "BNE     loc_FFC4A9C4\n"
                "MOV     R0, #3\n"
"loc_FFC4A9C0:\n"
                "STR     R0, [R5,#0x54]\n"
"loc_FFC4A9C4:\n"
                "LDR     R0, =0x195A8\n"
                "LDR     R0, [R0,#8]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC4A9DC\n"
                "BL      sub_FFC391F8\n"
                "B       loc_FFC4A9E0\n"
"loc_FFC4A9DC:\n"
                "BL      sub_FFC4A430\n"
"loc_FFC4A9E0:\n"
                "MOV     R0, #5\n"
                "STR     R0, [R5,#0x38]\n"
"loc_FFC4A9E8:\n"
                "ADD     SP, SP, #0x40\n"
                "LDMFD   SP!, {R4-R8,PC}\n"
"loc_FFC4A9F0:\n"
                "LDR     LR, [SP,#0x30]\n"
                "CMP     LR, #0\n"
                "BEQ     loc_FFC4AAB8\n"
                "STR     R7, [R5,#0x2C]\n"
                "LDR     R0, [R5,#0x6C]\n"
                "LDR     R1, [R4,#0x14]\n"
                "LDR     R2, [R4,#0x18]\n"
                "LDR     R12, [R4,#0xC]\n"
                "ADD     R3, SP, #0x38\n"
                "ADD     R8, SP, #0x14\n"
                "STMIA   R8, {R0-R3}\n"
                "LDR     R3, [R5,#0x58]\n"
                "ADD     R2, SP, #0x3C\n"
                "ADD     R8, SP, #8\n"
           //   "LDRD    R0, [SP,#0x28]\n"
                ".long   0xE1CD02D8\n"
                "STMIA   R8, {R0,R2,R3}\n"
                "STR     R1, [SP,#4]\n"
                "STR     LR, [SP]\n"
                "LDMIB   R4, {R0,R1}\n"
                "LDR     R3, [SP,#0x34]\n"
                "MOV     R2, R12\n"
                "BL      sub_FFCD75A0\n"
                "LDR     R0, [R5,#0x10]\n"
                "MOV     R1, #0x3E8\n"
                "BL      sub_FFC0BA54\n"
                "CMP     R0, #9\n"
                "BNE     loc_FFC4AA6C\n"
                "BL      sub_FFD13908\n"
                "MOV     R0, #0x90000\n"
                "STR     R7, [R5,#0x38]\n"
                "B       loc_FFC4AA84\n"
"loc_FFC4AA6C:\n"
                "LDR     R0, [SP,#0x38]\n"
                "CMP     R0, #0\n"
                "BEQ     loc_FFC4AA8C\n"
                "BL      sub_FFD13908\n"
                "MOV     R0, #0xA0000\n"
                "STR     R7, [R5,#0x38]\n"
"loc_FFC4AA84:\n"
                "BL      sub_FFC5F9A0\n"
                "B       loc_FFC4A9E8\n"
"loc_FFC4AA8C:\n"
                "BL      sub_FFCD7664\n"
                "LDR     R0, [SP,#0x34]\n"
                "LDR     R1, [SP,#0x3C]\n"
                "BL      sub_FFD136B0\n"
                "LDR     R0, [R5,#0x4C]\n"
                "LDR     R1, =0x55BC\n"
                "ADD     R0, R0, #1\n"
                "STR     R0, [R5,#0x4C]\n"
                "LDR     R0, [SP,#0x3C]\n"
                "MOV     R2, #0\n"
                "BL      sub_FFD11530_my\n"     //----------------->
"loc_FFC4AAB8:\n"
                "LDR     R0, [R5,#0x50]\n"
                "ADD     R0, R0, #1\n"
                "STR     R0, [R5,#0x50]\n"
                "LDR     R1, [R5,#0x78]\n"
                "MUL     R0, R1, R0\n"
                "LDR     R1, [R5,#0x74]\n"
                "BL      sub_FFE585E4\n"
                "MOV     R4, R0\n"
                "BL      sub_FFD13940\n"
                "LDR     R1, [R5,#0x70]\n"
                "CMP     R1, R4\n"
                "BNE     loc_FFC4AAF4\n"
                "LDR     R0, [R5,#0x30]\n"
                "CMP     R0, #1\n"
                "BNE     loc_FFC4AB08\n"
"loc_FFC4AAF4:\n"
                "LDR     R1, [R5,#0x84]\n"
                "MOV     R0, R4\n"
            //  "BLX     R1\n"
                ".long   0xE12FFF31\n"
                "STR     R4, [R5,#0x70]\n"
                "STR     R6, [R5,#0x30]\n"
"loc_FFC4AB08:\n"
                "STR     R6, [R5,#0x2C]\n"
                "B       loc_FFC4A9E8\n"
 );
} 


void __attribute__((naked,noinline)) sub_FFD11530_my(){ 
 asm volatile(
                "STMFD   SP!, {R4-R8,LR}\n"
                "LDR     R4, =0xA4AC\n"
                "LDR     LR, [R4]\n"
                "LDR     R2, [R4,#8]\n"
                "CMP     LR, #0\n"
                "LDRNE   R3, [R4,#0xC]\n"
                "MOV     R5, R2\n"
                "CMPNE   R3, #1\n"
                "MOVEQ   R2, #0\n"
                "STREQ   R0, [R4]\n"
                "STREQ   R2, [R4,#0xC]\n"
                "BEQ     loc_FFD115FC\n"
                "LDR     R3, [R4,#4]\n"
                "LDR     R7, =table\n"             // *
                "ADD     R12, R3, R3,LSL#1\n"
                "LDR     R3, [R7,R12,LSL#2]\n"
                "ADD     R6, R7, #0x30\n"
                "LDR     R8, [R6,R12,LSL#2]\n"
                "SUB     R3, LR, R3\n"
                "CMP     R3, #0\n"
                "SUB     LR, LR, R8\n"
                "BLE     loc_FFD115B8\n"
                "ADD     R12, R7, R12,LSL#2\n"
                "LDR     LR, [R12,#4]\n"
                "CMP     LR, R3\n"
                "ADDGE   R2, R2, #1\n"
                "BGE     loc_FFD115AC\n"
                "LDR     R12, [R12,#8]\n"
                "CMP     R12, R3\n"
                "ADDLT   R2, R2, #3\n"
                "ADDGE   R2, R2, #2\n"
"loc_FFD115AC:\n"
     //         "CMP     R2, #0x17\n"   // -
     //         "MOVGE   R2, #0x16\n"   // -
                "CMP     R2, #0x1A\n"   // +
                "MOVGE   R2, #0x19\n"   // +
                "B       loc_FFD115EC\n"
"loc_FFD115B8:\n"
                "CMP     LR, #0\n"
                "BGE     loc_FFD115EC\n"
                "ADD     R3, R6, R12,LSL#2\n"
                "LDR     R12, [R3,#4]\n"
                "CMP     R12, LR\n"
                "SUBLE   R2, R2, #1\n"
                "BLE     loc_FFD115E4\n"
                "LDR     R3, [R3,#8]\n"
                "CMP     R3, LR\n"
                "SUBGT   R2, R2, #3\n"
                "SUBLE   R2, R2, #2\n"
"loc_FFD115E4:\n"
                "CMP     R2, #0\n"
                "MOVLT   R2, #0\n"
"loc_FFD115EC:\n"
                "CMP     R2, R5\n"
                "STRNE   R2, [R4,#8]\n"
                "MOVNE   R2, #1\n"
                "STRNE   R2, [R4,#0xC]\n"
"loc_FFD115FC:\n"
                "LDR     R2, =CompressionRateTable\n"   // *
                "LDR     R3, [R4,#8]\n"
                "LDR     R2, [R2,R3,LSL#2]\n"

                "LDR     R3, =video_mode\n"      // +
                "LDR     R3, [R3]\n"             // +
                "LDR     R3, [R3]\n"             // +
                "CMP     R3, #1\n"               // +
                "LDREQ   R3, =video_quality\n"   // +     
                "LDREQ   R3, [R3]\n"             // +     
                "LDREQ   R2, [R3]\n"             // +     

                "STR     R2, [R1]\n"
                "STR     R0, [R4]\n"
                "BL      mute_on_zoom\n"         // +
                "LDMFD   SP!, {R4-R8,PC}\n"
 );
} 

#include "conf.h"

int *video_quality = &conf.video_quality;
int *video_mode    = &conf.video_mode;

long def_table[24]={0x2000, 0x38D, 0x788, 0x5800, 0x9C5, 0x14B8, 0x10000, 0x1C6A, 0x3C45, 0x8000, 0xE35, 0x1E23,
           0x1CCD, -0x2E1, -0x579, 0x4F33, -0x7EB, -0xF0C, 0xE666, -0x170A, -0x2BC6, 0x7333, -0xB85, -0x15E3};

long table[24];

void change_video_tables(int a, int b){
 int i;
 for (i=0;i<24;i++) table[i]=(def_table[i]*a)/b; 
}

long CompressionRateTable[]={0x60, 0x5D, 0x5A, 0x57, 0x54, 0x51, 0x4D, 0x48, 0x42, 0x3B, 0x32, 0x29, 0x22, 0x1D, 0x17, 0x14, 0x10, 0xE, 0xB, 9, 7, 6, 5, 4, 3, 2, 1};
                                                     	
